from time import sleep

from selenium.webdriver.common.by import By

from base.base import Base


class WebBase(Base):
    # 根据显示文本点击指定元素
    def web_base_click_element(self, father_xpath, child_xpath):
        # 1.点击复选框
        loc = By.XPATH, father_xpath
        self.base_click(loc)
        sleep(1)
        loc = By.XPATH, child_xpath
        self.base_click(loc)
